package hibernate.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.NamedQueries;
import org.hibernate.annotations.NamedQuery;
import org.hibernate.annotations.Parameter;

@SuppressWarnings("serial")
@Entity
@Table(name = "mp3ipod", catalog = "emmy")
@NamedQueries({  // Şimdilik bu query'lere gerek yok ihtiyaç olursa diye hazırlandı...
@NamedQuery(name = "findMp3ipodUretici",		 query = "from Mp3ipod where ureticiid = :muretici"),
@NamedQuery(name = "findMp3ipodRenk", 		     query = "from Mp3ipod where renk like :mRenk"),
@NamedQuery(name = "findMp3ipodFormatDestek", 	 query = "from Mp3ipod where formatDestek like :mFormatDestek"),
@NamedQuery(name = "findMp3ipodLcdEkran",    	 query = "from Mp3ipod where lcdEkran like :mLcdEkran"),
@NamedQuery(name = "findMp3ipodPilCesidi",       query = "from Mp3ipod where pilCesidi like :mPilCesidi"),
@NamedQuery(name = "findMp3ipodKapasite", 	     query = "from Mp3ipod where kapasite like :mKapasite"),
@NamedQuery(name = "findMp3ipodPilSuresi",   	 query = "from Mp3ipod where pilSuresi like :mPilSuresi"),
@NamedQuery(name = "findMp3ipodBoyutlari", 	     query = "from Mp3ipod where boyutlari like :mBoyutlari"),
@NamedQuery(name = "findMp3ipodAgirlik",    	 query = "from Mp3ipod where agirlik like :mAgirlik"),
@NamedQuery(name = "findMp3ipodBaglantiTipi",    query = "from Mp3ipod where baglantiTipi like :mBaglanTipi"),
@NamedQuery(name = "findMp3ipodFmRadio", 	     query = "from Mp3ipod where fmRadio like :mFmRadio"),
@NamedQuery(name = "findMp3ipodVideoDestek", 	 query = "from Mp3ipod where videoDestek like :mVideoDestek"),
@NamedQuery(name = "findMp3ipodFotoDestek",      query = "from Mp3ipod where fotografDestek like :mFotoDestek"),
@NamedQuery(name = "findMp3ipodCokluDilDestek",  query = "from Mp3ipod where cokluDilDestek like :mCokluDilDestek"),
@NamedQuery(name = "findMp3ipodGarantiSure", 	 query = "from Mp3ipod where garantiSuresi like :mGarantiSure")
})
public class Mp3ipod implements java.io.Serializable {

	private long aygitid;
	private Sirketprofil sirketprofil;
	private Aygit aygit;
	private String kapasite;
	private String formatDestek;
	private String lcdEkran;
	private String pilCesidi;
	private String pilSuresi;
	private String boyutlari;
	private String agirlik;
	private String baglantiTipi;
	private String renk;
	private String fmRadio;
	private String videoDestek;
	private String fotografDestek;
	private String cokluDilDestek;
	private String garantiSuresi;

	public Mp3ipod() {
	}

	public Mp3ipod(Sirketprofil sirketprofil, Aygit aygit, String kapasite,
			String formatDestek, String lcdEkran, String pilCesidi,
			String pilSuresi, String boyutlari, String agirlik,
			String baglantiTipi, String renk,
			String fmRadio, String videoDestek, String fotografDestek,
			String cokluDilDestek, String garantiSuresi) {
		this.sirketprofil = sirketprofil;
		this.aygit = aygit;
		this.kapasite = kapasite;
		this.formatDestek = formatDestek;
		this.lcdEkran = lcdEkran;
		this.pilCesidi = pilCesidi;
		this.pilSuresi = pilSuresi;
		this.boyutlari = boyutlari;
		this.agirlik = agirlik;
		this.baglantiTipi = baglantiTipi;		
		this.renk = renk;
		this.fmRadio = fmRadio;
		this.videoDestek = videoDestek;
		this.fotografDestek = fotografDestek;
		this.cokluDilDestek = cokluDilDestek;
		this.garantiSuresi = garantiSuresi;
	}

	@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "aygit"))
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "aygitid", unique = true, nullable = false)
	public long getAygitid() {
		return this.aygitid;
	}

	public void setAygitid(long aygitid) {
		this.aygitid = aygitid;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "ureticiid", nullable = false)
	public Sirketprofil getSirketprofil() {
		return this.sirketprofil;
	}

	public void setSirketprofil(Sirketprofil sirketprofil) {
		this.sirketprofil = sirketprofil;
	}

	@OneToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
	@PrimaryKeyJoinColumn
	public Aygit getAygit() {
		return this.aygit;
	}

	public void setAygit(Aygit aygit) {
		this.aygit = aygit;
	}

	@Column(name = "kapasite", nullable = false, length = 20)
	public String getKapasite() {
		return this.kapasite;
	}

	public void setKapasite(String kapasite) {
		this.kapasite = kapasite;
	}

	@Column(name = "formatDestek", nullable = false, length = 20)
	public String getFormatDestek() {
		return this.formatDestek;
	}

	public void setFormatDestek(String formatDestek) {
		this.formatDestek = formatDestek;
	}

	@Column(name = "lcdEkran", nullable = false, length = 20)
	public String getLcdEkran() {
		return this.lcdEkran;
	}

	public void setLcdEkran(String lcdEkran) {
		this.lcdEkran = lcdEkran;
	}

	@Column(name = "pilCesidi", nullable = false, length = 20)
	public String getPilCesidi() {
		return this.pilCesidi;
	}

	public void setPilCesidi(String pilCesidi) {
		this.pilCesidi = pilCesidi;
	}

	@Column(name = "pilSuresi", nullable = false, length = 20)
	public String getPilSuresi() {
		return this.pilSuresi;
	}

	public void setPilSuresi(String pilSuresi) {
		this.pilSuresi = pilSuresi;
	}

	@Column(name = "boyutlari", nullable = false, length = 20)
	public String getBoyutlari() {
		return this.boyutlari;
	}

	public void setBoyutlari(String boyutlari) {
		this.boyutlari = boyutlari;
	}

	@Column(name = "agirlik", nullable = false, length = 20)
	public String getAgirlik() {
		return this.agirlik;
	}

	public void setAgirlik(String agirlik) {
		this.agirlik = agirlik;
	}

	@Column(name = "baglantiTipi", nullable = false, length = 20)
	public String getBaglantiTipi() {
		return this.baglantiTipi;
	}

	public void setBaglantiTipi(String baglantiTipi) {
		this.baglantiTipi = baglantiTipi;
	}

	@Column(name = "renk", nullable = false, length = 20)
	public String getRenk() {
		return this.renk;
	}

	public void setRenk(String renk) {
		this.renk = renk;
	}

	@Column(name = "fmRadio", nullable = false, length = 20)
	public String getFmRadio() {
		return this.fmRadio;
	}

	public void setFmRadio(String fmRadio) {
		this.fmRadio = fmRadio;
	}

	@Column(name = "videoDestek", nullable = false, length = 20)
	public String getVideoDestek() {
		return this.videoDestek;
	}

	public void setVideoDestek(String videoDestek) {
		this.videoDestek = videoDestek;
	}

	@Column(name = "fotografDestek", nullable = false, length = 20)
	public String getFotografDestek() {
		return this.fotografDestek;
	}

	public void setFotografDestek(String fotografDestek) {
		this.fotografDestek = fotografDestek;
	}

	@Column(name = "cokluDilDestek", nullable = false, length = 20)
	public String getCokluDilDestek() {
		return this.cokluDilDestek;
	}

	public void setCokluDilDestek(String cokluDilDestek) {
		this.cokluDilDestek = cokluDilDestek;
	}

	@Column(name = "garantiSuresi", nullable = false, length = 20)
	public String getGarantiSuresi() {
		return this.garantiSuresi;
	}

	public void setGarantiSuresi(String garantiSuresi) {
		this.garantiSuresi = garantiSuresi;
	}
}